(global.webpackJsonp = global.webpackJsonp || []).push([ [ "pages/meituangroup/index" ], {
    "54e0": function(t, e, a) {
        var n = a("5b92");
        a.n(n).a;
    },
    "5b92": function(t, e, a) {},
    8687: function(t, e, a) {
        (function(t) {
            function e(t) {
                return t && t.__esModule ? t : {
                    default: t
                };
            }
            a("0cda"), e(a("66fd")), t(e(a("c797")).default);
        }).call(this, a("543d").createPage);
    },
    a486: function(t, n, o) {
        (function(r) {
            Object.defineProperty(n, "__esModule", {
                value: !0
            }), n.default = void 0;
            var t, i = (t = o("a34a")) && t.__esModule ? t : {
                default: t
            };
            function c(t, e, a, n, i, o, r) {
                try {
                    var s = t[o](r), c = s.value;
                } catch (t) {
                    return a(t), 0;
                }
                s.done ? e(c) : Promise.resolve(c).then(n, i);
            }
            function e(s) {
                return function() {
                    var t = this, r = arguments;
                    return new Promise(function(e, a) {
                        var n = s.apply(t, r);
                        function i(t) {
                            c(n, e, a, i, o, "next", t);
                        }
                        function o(t) {
                            c(n, e, a, i, o, "throw", t);
                        }
                        i(void 0);
                    });
                };
            }
            var s = getApp(), a = {
                data: function() {
                    return {
                        module_name: s.globalData.module_name,
                        showAlert_login: !1,
                        userinfo: r.getStorageSync("userinfo"),
                        setting: r.getStorageSync("setting"),
                        platform_id: 2,
                        isShowBack: !0,
                        isLogin: !1,
                        keyword: "",
                        actionStyle: {
                            color: "#FF8000"
                        },
                        barStyle: {
                            backgroundColor: "#FF8000"
                        },
                        inputStyle: {
                            width: "300rpx",
                            height: "72rpx",
                            background: "#F8F8F8",
                            borderRadius: "8rpx"
                        },
                        loading: !0,
                        filterNavFixedNum: 68,
                        isFixed: !1,
                        dropdownHiddden: !0,
                        showAction: !1,
                        showselectCity: !1,
                        action_list: [ {
                            text: "定位当前位置",
                            color: "#FF8000"
                        }, {
                            text: "选择所在城市"
                        } ],
                        select_city_list: [ [], [] ],
                        picker_props: {
                            label: "name",
                            value: "id"
                        },
                        picker_loading: !1,
                        default_selector: [ 0, 0 ],
                        current_picker_index: 0,
                        location: {},
                        province_list: [],
                        province_id: "",
                        selectcity: 0,
                        city_id: "73",
                        location_in_baidu: {
                            city: "定位中"
                        },
                        timestamp: 0,
                        seconds_kill_list: [ {
                            seckillShopDealInfoVO: {
                                dealList: [ {
                                    title: "超值单人餐米线2选1",
                                    imgUrl: "",
                                    finalPrice: 100,
                                    marketPrice: 200
                                } ]
                            }
                        }, {
                            seckillShopDealInfoVO: {
                                dealList: [ {
                                    title: "超值单人餐米线2选1",
                                    imgUrl: "",
                                    finalPrice: 100,
                                    marketPrice: 200
                                } ]
                            }
                        }, {
                            seckillShopDealInfoVO: {
                                dealList: [ {
                                    title: "超值单人餐米线2选1",
                                    imgUrl: "",
                                    finalPrice: 100,
                                    marketPrice: 200
                                } ]
                            }
                        } ],
                        big_category: [],
                        sub_category: [ {
                            id: "",
                            name: "全部分类"
                        } ],
                        cat0_id: 0,
                        cat1_id: "",
                        current_big_category_index: 0,
                        current_sub_category_index: 0,
                        sort_type: 1,
                        current_sort_type_index: 0,
                        current_radii_list_index: 0,
                        sort_type_list: [ {
                            name: "离我最近",
                            id: 1
                        }, {
                            name: "优惠最大",
                            id: 11
                        }, {
                            name: "销量最高",
                            id: 7
                        } ],
                        deal_type_list: [ {
                            id: 1,
                            name: "优惠套餐"
                        }, {
                            id: 2,
                            name: "代金券"
                        } ],
                        current_deal_type_index: -1,
                        deal_type: "",
                        radii_list: [ {
                            radii: 1e4,
                            name: "附近"
                        }, {
                            radii: 500,
                            name: "500米"
                        }, {
                            radii: 1e3,
                            name: "1000米"
                        }, {
                            radii: 2e3,
                            name: "2000米"
                        }, {
                            radii: 3e3,
                            name: "3000米"
                        }, {
                            radii: 4e3,
                            name: "4000米"
                        }, {
                            radii: 5e3,
                            name: "5000米"
                        } ],
                        radii: 2e4,
                        upper: "",
                        lower: "",
                        page: 1,
                        pagesize: 20,
                        list_load_status: "loading",
                        shop_list: [ {
                            shopInfo: {
                                shop_name: "豪享来牛排（赛博店）",
                                distance_to_show: "128.23m",
                                region_name: "科技市场/硅谷广场",
                                cate_name: "西餐",
                                shop_power: 40,
                                address: "金水区文化路68号数码港一、二层"
                            }
                        }, {
                            shopInfo: {
                                shop_name: "豪享来牛排（赛博店）",
                                distance_to_show: "128.23m",
                                region_name: "科技市场/硅谷广场",
                                cate_name: "西餐",
                                shop_power: 40,
                                address: "金水区文化路68号数码港一、二层"
                            }
                        }, {
                            shopInfo: {
                                shop_name: "豪享来牛排（赛博店）",
                                distance_to_show: "128.23m",
                                region_name: "科技市场/硅谷广场",
                                cate_name: "西餐",
                                shop_power: 40,
                                address: "金水区文化路68号数码港一、二层"
                            }
                        }, {
                            shopInfo: {
                                shop_name: "豪享来牛排（赛博店）",
                                distance_to_show: "128.23m",
                                region_name: "科技市场/硅谷广场",
                                cate_name: "西餐",
                                shop_power: 40,
                                address: "金水区文化路68号数码港一、二层"
                            }
                        } ],
                        scrollTop: 0,
                        stickyBoxHeight: 223,
                        business0: [],
                        business1: [ {
                            id: "",
                            name: "附近"
                        } ],
                        business1_maps: {},
                        current_business0_index: 0,
                        current_business1_index: 0,
                        district_id: "",
                        region_id: "",
                        radii_id: "",
                        pageKey: "",
                        height: "",
                        tabBar: [],
                        current_business_name: "附近",
                        is_tabbar: 1,
                        search_width: "300rpx"
                    };
                },
                components: {},
                props: {},
                filters: {
                    discount: function(t) {
                        return (Number(t.final_price) / Number(t.market_price) * 10).toFixed(1);
                    },
                    distance: function(t) {
                        return 1e3 < t ? (t / 1e3).toFixed(1) + "km" : t + "m";
                    }
                },
                onPageScroll: function(t) {
                    var e = this;
                    this.scrollTop = t.scrollTop, this.$u.throttle(function() {
                        e.scrollTop >= e.stickyBoxHeight ? e.isFixed = !0 : e.isFixed = !1;
                    }, 50);
                },
                onReady: function() {
                    var a = this;
                    return e(i.default.mark(function t() {
                        var e;
                        return i.default.wrap(function(t) {
                            for (;;) switch (t.prev = t.next) {
                              case 0:
                                return t.next = 2, a.$onLaunched;

                              case 2:
                                e = a, r.createSelectorQuery().select("#tabs").fields({
                                    size: !0
                                }, function(t) {
                                    t && (console.log(t.height), e.stickyBoxHeight = t.height);
                                }).exec();

                              case 4:
                              case "end":
                                return t.stop();
                            }
                        }, t);
                    }))();
                },
                onReachBottom: function() {
                    "nomore" != this.list_load_status && this.getShopList();
                },
                onShow: function() {
                    var n = this;
                    return e(i.default.mark(function t() {
                        var e, a;
                        return i.default.wrap(function(t) {
                            for (;;) switch (t.prev = t.next) {
                              case 0:
                                return t.next = 2, n.$onLaunched;

                              case 2:
                                for (e = 0, n.tabBar = r.getStorageSync("tabbar"), a = 0; a < n.tabBar.list.length; a++) -1 != n.tabBar.list[a].url.indexOf("meituangroup/index") && (n.pageKey = a, 
                                e = 1);
                                n.is_tabbar = 1 == e ? 1 : 0;

                              case 8:
                              case "end":
                                return t.stop();
                            }
                        }, t);
                    }))();
                },
                onShareAppMessage: function() {
                    var t = "pages/meituan/index?uid=" + r.getStorageSync("userinfo").user_id;
                    return {
                        title: this.sharetitle,
                        imageUrl: this.sharepic,
                        path: t
                    };
                },
                onPullDownRefresh: function() {},
                onLoad: function(t) {
                    var a = this;
                    return e(i.default.mark(function t() {
                        var e;
                        return i.default.wrap(function(t) {
                            for (;;) switch (t.prev = t.next) {
                              case 0:
                                return t.next = 2, a.$onLaunched;

                              case 2:
                                (e = a).setting = r.getStorageSync("setting"), e.tabBar = r.getStorageSync("tabbar"), 
                                e.userinfo = r.getStorageSync("userinfo"), e.getLocation(), e.module_name = s.globalData.module_name;

                              case 8:
                              case "end":
                                return t.stop();
                            }
                        }, t);
                    }))();
                },
                methods: {
                    upperr: function(t) {
                        this.upper = t;
                    },
                    lowerr: function(t) {
                        this.lower = t;
                    },
                    showActionn: function() {
                        this.showAction = !0;
                    },
                    getLocation: function() {
                        r.showLoading({
                            title: "加载中...",
                            mask: !1
                        });
                        var e = this;
                        r.getLocation({
                            type: "wgs84",
                            success: function(t) {
                                console.log(t), e.meituangroup_index(t);
                            },
                            fail: function(t) {
                                e.loading = !1, r.showModal({
                                    title: "系统提示",
                                    content: "请授权获取您的位置信息",
                                    showCancel: !0,
                                    success: function(t) {
                                        t.confirm ? (r.hideLoading(), e.again_getLocation()) : r.hideLoading();
                                    }
                                }), e.lat = 0, e.lon = 0;
                            }
                        });
                    },
                    meituangroup_index: function(t) {
                        console.log(t);
                        var a = this, e = s.globalData.util.url("entry/wxapp/meituangroup_index", {
                            m: s.globalData.module_name
                        });
                        r.setStorageSync("lon", t.longitude), r.setStorageSync("lat", t.latitude), a.lat = t.latitude, 
                        a.lon = t.longitude, r.request({
                            url: e,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                lon: t.longitude,
                                lat: t.latitude,
                                openid: r.getStorageSync("openid"),
                                province_id: a.province_id,
                                city_id: a.city_id,
                                selectcity: a.selectcity,
                                systemtype: r.getStorageSync("systemtype")
                            },
                            success: function(t) {
                                r.setStorageSync("provincename", t.data.provincename), r.setStorageSync("provinceid", t.data.provinceid), 
                                r.setStorageSync("city_id", t.data.cityid), a.province_id = t.data.provinceid, a.city_id = t.data.cityid, 
                                a.location_in_baidu.city = t.data.cityname, a.province_list = t.data.provincelist, 
                                a.big_category = t.data.cat0, a.cat0_id = t.data.cat0[0].id, a.sub_category = t.data.cat1, 
                                a.sub_category.unshift({
                                    id: "",
                                    name: "全部分类"
                                });
                                var e = +new Date().getTime();
                                t.data.seckillshowlist[0].endTime, e >= t.data.seckillshowlist[0].startTime ? a.timestamp = (t.data.seckillshowlist[0].endTime - +new Date().getTime()) / 1e3 : a.timestamp = 0, 
                                a.sharetitle = t.data.sharetitle, a.sharepic = t.data.sharepic, a.seconds_kill_list = t.data.seckilllist, 
                                a.business0 = a.radii_list, a.current_radii_list_index = 0, a.business1_maps = t.data.districtToRegionMaps, 
                                a.default_selector = [ t.data.pindex, t.data.cindex ], a.$refs.uDropdown.close(), 
                                r.hideLoading(), a.getShopList();
                                t = s.globalData.util.url("entry/wxapp/meituangroup_province_citylist", {
                                    m: s.globalData.module_name
                                });
                                r.request({
                                    url: t,
                                    method: "GET",
                                    header: {
                                        "content-type": "application/x-www-form-urlencoded"
                                    },
                                    success: function(t) {
                                        a.select_city_list = t.data;
                                    }
                                }), a.filterNavFixedNum = r.getStorageSync("headerHeight"), a.loading = !1;
                            }
                        });
                    },
                    again_getLocation: function() {
                        var e = this;
                        r.getSetting({
                            success: function(t) {
                                null != t.authSetting["scope.userLocation"] && 1 != t.authSetting["scope.userLocation"] ? r.showModal({
                                    title: "是否授权当前位置",
                                    content: "需要获取您的地理位置，请确认授权，否则无法获取您所需数据",
                                    success: function(t) {
                                        t.cancel ? r.showToast({
                                            title: "授权失败",
                                            icon: "success",
                                            duration: 1e3
                                        }) : t.confirm && r.openSetting({
                                            success: function(t) {
                                                1 == t.authSetting["scope.userLocation"] ? (r.showToast({
                                                    title: "授权成功",
                                                    icon: "success",
                                                    duration: 1e3
                                                }), e.getLocation(e)) : r.showToast({
                                                    title: "授权失败",
                                                    icon: "success",
                                                    duration: 1e3
                                                });
                                            }
                                        });
                                    }
                                }) : (t.authSetting["scope.userLocation"], e.getLocation(e));
                            }
                        });
                    },
                    getCurrCityCategory: function(e) {
                        e = this;
                        var t = s.globalData.util.url("entry/wxapp/meituangroup_cat1", {
                            m: s.globalData.module_name
                        });
                        r.request({
                            url: t,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                city_id: e.city_id,
                                cat0_id: e.cat0_id
                            },
                            success: function(t) {
                                e.sub_category = t.data.cat1, e.sub_category.unshift({
                                    id: "",
                                    name: "全部分类"
                                }), e.cat1_id = "", e.loading = !1, e.getShopList();
                            }
                        });
                    },
                    getShopList: function() {
                        r.showLoading({
                            title: "加载中...",
                            mask: !1
                        });
                        var a = this;
                        a.list_load_status = "loading";
                        var t = s.globalData.util.url("entry/wxapp/meituangroup_shoplist", {
                            m: s.globalData.module_name
                        });
                        r.request({
                            url: t,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                openid: r.getStorageSync("openid"),
                                cat0_id: a.cat0_id,
                                cat1_id: a.cat1_id,
                                deal_type: a.deal_type,
                                sort_type: a.sort_type,
                                key_words: a.keyword,
                                city_id: a.city_id,
                                lng: r.getStorageSync("lon"),
                                lat: r.getStorageSync("lat"),
                                radii: a.radii,
                                upper: a.upper,
                                lower: a.lower,
                                page: a.page,
                                pagesize: a.pagesize
                            },
                            success: function(t) {
                                var e;
                                200 == t.data.code && (e = t.data.shoplist, 1 == t.data.has_more ? a.list_load_status = "loadmore" : a.list_load_status = "nomore", 
                                a.page = t.data.page, 1 == a.page ? a.shop_list = e : a.shop_list = a.shop_list.concat(e), 
                                a.page++, r.hideLoading());
                            }
                        });
                    },
                    search: function() {
                        var t = this;
                        this.page = 1, this.list_load_status = "loading", this.getShopList(!0, function() {
                            t.scrollTop < t.stickyBoxHeight && r.pageScrollTo({
                                scrollTop: t.stickyBoxHeight,
                                success: function() {
                                    t.isFixed = !0;
                                }
                            });
                        });
                    },
                    tabChange: function(t) {
                        this.current_big_category_index = t, this.cat0_id = this.big_category[this.current_big_category_index].id, 
                        this.page = 1, this.shop_list = [], this.current_sub_category_index = 0, this.list_load_status = "loading", 
                        this.$refs.uDropdown.close(), this.loading = !1, this.getCurrCityCategory();
                    },
                    subCategoryChange: function(t) {
                        this.current_sub_category_index = t.currentTarget.dataset.index, this.cat1_id = this.sub_category[this.current_sub_category_index].id, 
                        this.page = 1, this.list_load_status = "loading", this.loading = !1, this.getShopList(), 
                        this.$refs.uDropdown.close();
                    },
                    sortTypeChange: function(t) {
                        this.current_sort_type_index = t.currentTarget.dataset.index, this.sort_type = this.sort_type_list[this.current_sort_type_index].id, 
                        this.page = 1, this.list_load_status = "loading", this.loading = !1, this.getShopList(), 
                        this.$refs.uDropdown.close();
                    },
                    dealTypeChange: function(t) {
                        this.current_deal_type_index = t.currentTarget.dataset.index, this.page = 1, this.deal_type = this.deal_type_list[this.current_deal_type_index].id;
                    },
                    business0Change: function(t) {
                        this.current_radii_list_index = t.currentTarget.dataset.index, this.radii = this.radii_list[this.current_radii_list_index].radii, 
                        this.page = 1, this.getShopList(), this.$refs.uDropdown.close();
                    },
                    reset: function() {
                        this.upper = "", this.lower = "", this.current_deal_type_index = -1, this.deal_type = "";
                    },
                    confirm: function() {
                        this.page = 1, this.list_load_status = "loading", this.getShopList(!0), this.$refs.uDropdown.close();
                    },
                    dropdownClose: function(t) {
                        this.dropdownHiddden = !0;
                    },
                    dropdownOpen: function(t) {
                        var e = this;
                        this.dropdownHiddden = !1, this.scrollTop < this.stickyBoxHeight && r.pageScrollTo({
                            scrollTop: this.stickyBoxHeight,
                            success: function() {
                                e.isFixed = !0;
                            }
                        });
                    },
                    actionFn: function(t) {
                        0 == t ? (this.radii = 3e3, this.page = 1, this.list_load_status = "loading", this.$refs.uDropdown.close(), 
                        this.selectcity = 0, this.getLocation()) : 1 == t && (this.showselectCity = 1);
                    },
                    selectCityFn: function(t) {
                        var e = this;
                        e.page = 1, e.current_radii_list_index = 0, e.current_business1_index = 0, e.district_id = "", 
                        e.region_id = "", e.list_load_status = "loading", e.radii = 0, e.upper = "", e.lower = "", 
                        e.current_deal_type_index = -1, e.deal_type = "", e.cat0_id = 0, e.cat1_id = "", 
                        e.current_big_category_index = 0, e.current_sub_category_index = 0, e.sort_type = 1, 
                        e.current_sort_type_index = 0, e.timestamp = 0, e.keyword = "", e.province_id = t[0].value, 
                        e.city_id = t[1].value, e.selectcity = 1, e.location_in_baidu.city = t[1].label, 
                        e.getLocation();
                    },
                    toSkill: function() {
                        var t;
                        1 == this.setting.meituangroup_newurl ? (t = s.globalData.util.url("entry/wxapp/meituangroup_url", {
                            m: s.globalData.module_name
                        }), r.request({
                            url: t,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                openid: r.getStorageSync("openid"),
                                appid_type: 5
                            },
                            success: function(t) {
                                r.setStorageSync("mtfxwm_url", t.data.miniProgramPath), r.setStorageSync("mtfxwm_h5", t.data.commonLink), 
                                r.setStorageSync("mtfxwmqrcode2", t.data.miniProgramQrCode), r.navigateToMiniProgram({
                                    appId: "wxde8ac0a21135c07d",
                                    path: t.data.miniProgramPath
                                });
                            }
                        })) : r.navigateTo({
                            url: "secondsKill"
                        });
                    },
                    toDetail: function(t) {
                        var e;
                        1 == this.setting.meituangroup_newurl ? (e = s.globalData.util.url("entry/wxapp/meituangroup_url", {
                            m: s.globalData.module_name
                        }), r.request({
                            url: e,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                openid: r.getStorageSync("openid"),
                                appid_type: 5
                            },
                            success: function(t) {
                                r.setStorageSync("mtfxwm_url", t.data.miniProgramPath), r.setStorageSync("mtfxwm_h5", t.data.commonLink), 
                                r.setStorageSync("mtfxwmqrcode2", t.data.miniProgramQrCode), r.navigateToMiniProgram({
                                    appId: "wxde8ac0a21135c07d",
                                    path: t.data.miniProgramPath
                                });
                            }
                        })) : r.navigateTo({
                            url: "../../pagesA/pages/meituangroupA/detail?id=".concat(t.currentTarget.dataset.shopid, "&cat0_id=").concat(this.cat0_id, "&lng=").concat(r.getStorageSync("lon"), "&lat=").concat(r.getStorageSync("lat"), "&cityid=").concat(this.city_id)
                        });
                    },
                    change: function(t) {
                        var e = this, a = this.tabBar.list[t];
                        if (this.pageKey = t, r.setStorageSync("pageKey", t), 1 == a.adtype) {
                            if (1 == a.appid_type && r.getStorageSync("mtwm_url")) return void r.navigateToMiniProgram({
                                appId: "wxde8ac0a21135c07d",
                                path: r.getStorageSync("mtwm_url")
                            });
                            if (1 == a.appid_type && !r.getStorageSync("mtwm_url")) return e.appid_type = 1, 
                            void e.meituan_urlFun();
                            if (2 == a.appid_type && r.getStorageSync("mtsc_url")) return void r.navigateToMiniProgram({
                                appId: "wxde8ac0a21135c07d",
                                path: r.getStorageSync("mtsc_url")
                            });
                            if (2 == a.appid_type && !r.getStorageSync("mtsc_url")) return e.appid_type = 2, 
                            void e.meituan_urlFun();
                            if (3 == a.appid_type && r.getStorageSync("elmwm_url")) return r.navigateToMiniProgram({
                                appId: "wxece3a9a4c82f58c9",
                                path: r.getStorageSync("elmwm_url")
                            }), e.updatepid(), void console.log(r.getStorageSync("elmwm_url"));
                            if (3 == a.appid_type && !r.getStorageSync("elmwm_url")) return e.appid_type = 3, 
                            void e.gettaobaoauth();
                            if (4 == a.appid_type && r.getStorageSync("elmsc_url")) return r.navigateToMiniProgram({
                                appId: "wxece3a9a4c82f58c9",
                                path: r.getStorageSync("elmsc_url")
                            }), e.updatepid(), void console.log(r.getStorageSync("elmsc_url"));
                            if (4 == a.appid_type && !r.getStorageSync("elmsc_url")) return console.log("ccc"), 
                            e.appid_type = 4, void e.gettaobaoauth();
                            if (0 == a.appid_type) return void r.navigateToMiniProgram({
                                appId: a.appid,
                                path: a.path
                            });
                        }
                        if (5 != a.adtype) if (4 != a.adtype) 2 != a.adtype && 3 != a.adtype || (e = s.globalData.util.url("entry/wxapp/api", {
                            m: s.globalData.module_name,
                            o: "ad_kefubind"
                        }), r.request({
                            url: e,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                adtype: "ad",
                                adid: a.adid,
                                openid: r.getStorageSync("openid")
                            },
                            success: function(t) {}
                        }), this.contact_title_desc = "", this.contact_type = "ad", this.contact_id = a.adid, 
                        this.contact_title = a.title, this.contact_title_text = a.title_text, this.contact_title_desc = a.title_desc, 
                        this.contact_thumb = r.getStorageSync("setting").dianwo, this.showDialog3()); else {
                            r.setStorageSync("index_nav", a.url);
                            var n = getCurrentPages();
                            n.reverse();
                            for (var i = a.url.replace("../", ""), o = 0; o < n.length; o++) if (-1 != n[o].route.indexOf(i)) return void r.navigateBack({
                                delta: o
                            });
                            if (-1 == a.url.indexOf("../index/") && -1 == a.url.indexOf("../meituangroup/") && -1 == a.url.indexOf("../user/") && -1 == a.url.indexOf("../movie/") && -1 == a.url.indexOf("../shop/") && -1 == a.url.indexOf("../kefu/") && -1 == a.url.indexOf("../elm/") && -1 == a.url.indexOf("../meituan/") && -1 == a.url.indexOf("../mall/")) return -1 != a.url.indexOf("../../pages/index/") || -1 != a.url.indexOf("../../pages/user/") || -1 != a.url.indexOf("../../pages/kefu/") ? (i = a.url.replace("../../pages/", "../"), 
                            void r.navigateTo({
                                url: i
                            })) : -1 != a.url.indexOf("../../pages/meituan/") || -1 != a.url.indexOf("../../pages/elm/") || -1 != a.url.indexOf("../../pages/eat/") ? (i = a.url.replace("../../pages/", "../../pagesA/pages/"), 
                            void r.navigateTo({
                                url: i
                            })) : -1 != a.url.indexOf("../../pagesA/pages/movie/") || -1 != a.url.indexOf("../../pagesA/pages/shop/") || -1 != a.url.indexOf("../../pagesA/pages/mallA/mallindex") ? (i = a.url.replace("../../pagesA/pages/", "../"), 
                            void r.navigateTo({
                                url: i
                            })) : -1 == a.url.indexOf("../../pagesA/pages/movieA/") && -1 == a.url.indexOf("../../pagesA/pages/shopA/") && -1 == a.url.indexOf("../../pagesA/pages/meituan/") && -1 == a.url.indexOf("../../pagesA/pages/elm/") && -1 == a.url.indexOf("../../pagesA/pages/eat/") && -1 == a.url.indexOf("../../pagesA/pages/userA/") && (-1 != a.url.indexOf("../meituan/") || -1 != a.url.indexOf("../elm/") || -1 != a.url.indexOf("../eat/")) ? (i = a.url.replace("../", "../../pagesA/pages/"), 
                            void r.navigateTo({
                                url: i
                            })) : void r.navigateTo({
                                url: a.url
                            });
                            r.navigateTo({
                                url: a.url
                            });
                        } else r.navigateTo({
                            url: "../kefu/webview?return_url=" + encodeURIComponent(a.url)
                        });
                    },
                    fatherHeight: function(t) {
                        this.height = t;
                    },
                    tapButton: function() {
                        1 == this.currentIndex ? this.h5 = r.getStorageSync("mtsc_h5") : this.h5 = r.getStorageSync("mtwm_h5"), 
                        r.setClipboardData({
                            data: this.h5,
                            success: function(t) {
                                r.showToast({
                                    title: "复制成功",
                                    icon: "none"
                                });
                            }
                        });
                    },
                    copy_wm: function() {
                        var t = 1 == r.getStorageSync("setting").poster_type ? r.getStorageSync("mtwm_h5") : r.getStorageSync("setting").waimaitt_meituanwm_tuantext_c;
                        r.setClipboardData({
                            data: t,
                            success: function(t) {
                                r.showToast({
                                    title: "复制成功",
                                    icon: "none"
                                });
                            }
                        });
                    },
                    copy_sc: function() {
                        var t = 1 == r.getStorageSync("setting").poster_type ? r.getStorageSync("mtsc_h5") : r.getStorageSync("setting").waimaitt_meituansc_tuantext_c;
                        r.setClipboardData({
                            data: t,
                            success: function(t) {
                                r.showToast({
                                    title: "复制成功",
                                    icon: "none"
                                });
                            }
                        });
                    },
                    userlogin: function() {},
                    login: function(e) {
                        var a = this;
                        this.closeDialog2(), r.getSetting({
                            success: function(t) {
                                t.authSetting["scope.userInfo"] ? r.getUserInfo({
                                    success: function(t) {
                                        a.userAuth(e, t.userInfo, "login");
                                    }
                                }) : a.userAuth(e, null, "login");
                            }
                        });
                    },
                    getWxCode: function() {
                        var e = this;
                        wx.login({
                            success: function(t) {
                                e.wxCode = t.code;
                            }
                        });
                    },
                    getUserProfile: function() {
                        var a = this;
                        wx.getUserProfile({
                            desc: "请完善会员资料",
                            success: function(t) {
                                console.log(t.userInfo);
                                var e = s.globalData.util.url("entry/wxapp/userinfo2", {
                                    m: s.globalData.module_name
                                }), t = {
                                    avatarUrl: t.userInfo.avatarUrl,
                                    nickName: t.userInfo.nickName,
                                    openid: r.getStorageSync("openid")
                                };
                                r.request({
                                    url: e,
                                    method: "POST",
                                    header: {
                                        "content-type": "application/x-www-form-urlencoded"
                                    },
                                    data: t,
                                    success: function(t) {
                                        1 == t.data.status && (r.setStorageSync("userinfo", t.data.data.userinfo), a.userinfo = t.data.data.userinfo, 
                                        a.closeDialog2(), r.showToast({
                                            title: "登录成功",
                                            icon: "none"
                                        }));
                                    }
                                });
                            }
                        });
                    },
                    userAuth: function(a, t, n) {
                        var i = this;
                        "getUserInfo:ok" == a.detail.errMsg ? wx.login({
                            success: function(t) {
                                var e = s.globalData.util.url("entry/wxapp/api", {
                                    m: s.globalData.module_name,
                                    o: "userinfo"
                                }), t = {
                                    code: t.code,
                                    encryptedData: a.detail.encryptedData,
                                    iv: a.detail.iv,
                                    openid: r.getStorageSync("openid"),
                                    invite_uid: wx.getStorageSync("invite_uid")
                                };
                                r.request({
                                    url: e,
                                    method: "POST",
                                    header: {
                                        "content-type": "application/x-www-form-urlencoded"
                                    },
                                    data: t,
                                    success: function(t) {
                                        1 == t.data.status && (t = s.globalData.crypt.Decrypt(t.data.data.data, t.data.data.key), 
                                        t = JSON.parse(t), r.setStorageSync("userinfo", t.userinfo), i.userinfo = t.userinfo, 
                                        "login" == n && (i.closeDialog2(), r.showToast({
                                            title: "登录成功",
                                            icon: "none"
                                        })), 1 == i.currentIndex ? i.load_mtscqrcode2() : i.load_mtwmqrcode2());
                                    }
                                });
                            }
                        }) : r.showToast({
                            title: "获取用户信息失败",
                            icon: "none"
                        });
                    },
                    closeAlert: function() {
                        this.closeDialog2();
                    },
                    meituan_urlFun: function() {
                        var a = this, n = this;
                        if (1 == n.appid_type && r.getStorageSync("mtwm_url")) return 1 == r.getStorageSync("setting").mtpic && 1 == r.getStorageSync("setting").poster_type ? r.previewImage({
                            urls: [ r.getStorageSync("mtwmqrcode2") ]
                        }) : r.navigateToMiniProgram({
                            appId: "wxde8ac0a21135c07d",
                            path: r.getStorageSync("mtwm_url")
                        }), void r.hideLoading();
                        if (2 == n.appid_type && r.getStorageSync("mtsc_url")) return 1 == r.getStorageSync("setting").mtpic && 1 == r.getStorageSync("setting").poster_type ? r.previewImage({
                            urls: [ r.getStorageSync("mtscqrcode2") ]
                        }) : r.navigateToMiniProgram({
                            appId: "wxde8ac0a21135c07d",
                            path: r.getStorageSync("mtsc_url")
                        }), void r.hideLoading();
                        var t = s.globalData.util.url("entry/wxapp/qrcode_mtelm2", {
                            m: s.globalData.module_name,
                            o: "qrcode_mtelm"
                        });
                        r.request({
                            url: t,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                openid: r.getStorageSync("openid"),
                                appid_type: n.appid_type
                            },
                            success: function(t) {
                                var e = s.globalData.crypt.Decrypt(t.data.data.data, t.data.data.key), e = JSON.parse(e);
                                console.log(e), n.sharetitle = t.data.sharetitle, n.sharepic = t.data.sharepic, 
                                1 == n.appid_type && (r.setStorageSync("mtwm_url", e.mtwm_url), r.setStorageSync("mtwm_h5", e.mtwm_h5), 
                                r.setStorageSync("mtwmqrcode2", e.mtwm_qrcode), a.h5 = e.mtwm_h5, 1 == r.getStorageSync("setting").mtpic && 1 == r.getStorageSync("setting").poster_type ? r.previewImage({
                                    urls: [ r.getStorageSync("mtwmqrcode2") ]
                                }) : r.navigateToMiniProgram({
                                    appId: "wxde8ac0a21135c07d",
                                    path: e.mtwm_url
                                }), r.hideLoading(), r.hideLoading()), 2 == n.appid_type && (r.setStorageSync("mtsc_url", e.mtsc_url), 
                                r.setStorageSync("mtsc_h5", e.mtsc_h5), r.setStorageSync("mtscqrcode2", e.mtsc_qrcode), 
                                a.h5 = e.mtsc_h5, 1 == r.getStorageSync("setting").mtpic && 1 == r.getStorageSync("setting").poster_type ? r.previewImage({
                                    urls: [ r.getStorageSync("mtscqrcode2") ]
                                }) : r.navigateToMiniProgram({
                                    appId: "wxde8ac0a21135c07d",
                                    path: e.mtsc_url
                                }), r.hideLoading(), r.hideLoading()), r.hideLoading();
                            }
                        }), r.hideLoading();
                    },
                    meituan_urlFun2: function() {
                        var t, e = this, a = this;
                        0 == this.currentIndex && r.getStorageSync("mtwmqrcode2") || 1 == this.currentIndex && r.getStorageSync("mtscqrcode2") || (1 == this.currentIndex ? a.appid_type = 2 : a.appid_type = 1, 
                        t = s.globalData.util.url("entry/wxapp/api", {
                            m: s.globalData.module_name,
                            o: "qrcode_mtelm"
                        }), r.request({
                            url: t,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                openid: r.getStorageSync("openid"),
                                appid_type: a.appid_type,
                                type: 1
                            },
                            success: function(t) {
                                t = s.globalData.crypt.Decrypt(t.data.data.data, t.data.data.key), t = JSON.parse(t);
                                console.log(t), 1 == a.appid_type && (r.setStorageSync("mtwm_h5", t.mtwm_h5), r.setStorageSync("mtwmqrcode2", t.mtwm_qrcode), 
                                e.h5 = t.mtwm_h5), 2 == a.appid_type && (r.setStorageSync("mtsc_h5", t.mtsc_h5), 
                                r.setStorageSync("mtscqrcode2", t.mtsc_qrcode), e.h5 = t.mtsc_h5);
                            }
                        }));
                    },
                    lingnextwm: function() {
                        r.navigateToMiniProgram({
                            appId: r.getStorageSync("setting").waimaitt_meituanwm_lingnextappid,
                            path: r.getStorageSync("setting").waimaitt_meituanwm_lingnextpath
                        });
                    },
                    lingnextsc: function() {
                        r.navigateToMiniProgram({
                            appId: r.getStorageSync("setting").waimaitt_meituansc_lingnextappid,
                            path: r.getStorageSync("setting").waimaitt_meituansc_lingnextpath
                        });
                    },
                    gethongbao_mtwm: function() {
                        var a = this;
                        if (r.showLoading({
                            title: "加载中...",
                            mask: !1
                        }), 0 < r.getStorageSync("setting").warn_tplid.length && r.getStorageSync("warn_daynum") < r.getStorageSync("setting").warn_tpl_daynum) wx.requestSubscribeMessage({
                            tmplIds: r.getStorageSync("setting").warn_tplid,
                            success: function(t) {
                                if (console.log(t), "reject" == t[r.getStorageSync("setting").warn_yhq_tplid]) {
                                    if (1 == a.currentIndex && r.getStorageSync("mtsc_url")) return 1 == r.getStorageSync("setting").mtpic && 1 == r.getStorageSync("setting").poster_type ? r.previewImage({
                                        urls: [ r.getStorageSync("mtscqrcode2") ]
                                    }) : r.navigateToMiniProgram({
                                        appId: "wxde8ac0a21135c07d",
                                        path: r.getStorageSync("mtsc_url")
                                    }), void r.hideLoading();
                                    if (1 == a.currentIndex && !r.getStorageSync("mtsc_url")) return a.appid_type = 2, 
                                    void a.meituan_urlFun();
                                    if (0 == a.currentIndex && r.getStorageSync("mtwm_url")) return 1 == r.getStorageSync("setting").mtpic && 1 == r.getStorageSync("setting").poster_type ? r.previewImage({
                                        urls: [ r.getStorageSync("mtwmqrcode2") ]
                                    }) : r.navigateToMiniProgram({
                                        appId: "wxde8ac0a21135c07d",
                                        path: r.getStorageSync("mtwm_url")
                                    }), void r.hideLoading();
                                    if (0 == a.currentIndex && !r.getStorageSync("mtwm_url")) return a.appid_type = 1, 
                                    void a.meituan_urlFun();
                                    var e = s.globalData.util.url("entry/wxapp/api", {
                                        m: s.globalData.module_name,
                                        o: "subscribemessage"
                                    });
                                    r.request({
                                        url: e,
                                        method: "POST",
                                        header: {
                                            "content-type": "application/x-www-form-urlencoded"
                                        },
                                        data: {
                                            openid: r.getStorageSync("openid"),
                                            type: 1
                                        },
                                        success: function(t) {
                                            r.setStorageSync("warn_daynum", t.data.warm_daynum);
                                        }
                                    }), r.hideLoading();
                                } else {
                                    if (e = s.globalData.util.url("entry/wxapp/api", {
                                        m: s.globalData.module_name,
                                        o: "subscribemessage"
                                    }), r.request({
                                        url: e,
                                        method: "POST",
                                        header: {
                                            "content-type": "application/x-www-form-urlencoded"
                                        },
                                        data: {
                                            openid: r.getStorageSync("openid"),
                                            type: 1
                                        },
                                        success: function(t) {
                                            r.setStorageSync("warn_daynum", t.data.warm_daynum);
                                        }
                                    }), 1 == a.currentIndex && r.getStorageSync("mtsc_url")) return 1 == r.getStorageSync("setting").mtpic && 1 == r.getStorageSync("setting").poster_type ? r.previewImage({
                                        urls: [ r.getStorageSync("mtscqrcode2") ]
                                    }) : r.navigateToMiniProgram({
                                        appId: "wxde8ac0a21135c07d",
                                        path: r.getStorageSync("mtsc_url")
                                    }), void r.hideLoading();
                                    if (1 == a.currentIndex && !r.getStorageSync("mtsc_url")) return a.appid_type = 2, 
                                    void a.meituan_urlFun();
                                    if (0 == a.currentIndex && r.getStorageSync("mtwm_url")) return 1 == r.getStorageSync("setting").mtpic && 1 == r.getStorageSync("setting").poster_type ? r.previewImage({
                                        urls: [ r.getStorageSync("mtwmqrcode2") ]
                                    }) : r.navigateToMiniProgram({
                                        appId: "wxde8ac0a21135c07d",
                                        path: r.getStorageSync("mtwm_url")
                                    }), void r.hideLoading();
                                    if (0 == a.currentIndex && !r.getStorageSync("mtwm_url")) return a.appid_type = 1, 
                                    void a.meituan_urlFun();
                                    r.hideLoading();
                                }
                                r.hideLoading();
                            },
                            fail: function() {
                                return 1 == a.currentIndex && r.getStorageSync("mtsc_url") ? (1 == r.getStorageSync("setting").mtpic && 1 == r.getStorageSync("setting").poster_type ? r.previewImage({
                                    urls: [ r.getStorageSync("mtscqrcode2") ]
                                }) : r.navigateToMiniProgram({
                                    appId: "wxde8ac0a21135c07d",
                                    path: r.getStorageSync("mtsc_url")
                                }), void r.hideLoading()) : 1 != a.currentIndex || r.getStorageSync("mtsc_url") ? 0 == a.currentIndex && r.getStorageSync("mtwm_url") ? (1 == r.getStorageSync("setting").mtpic && 1 == r.getStorageSync("setting").poster_type ? r.previewImage({
                                    urls: [ r.getStorageSync("mtwmqrcode2") ]
                                }) : r.navigateToMiniProgram({
                                    appId: "wxde8ac0a21135c07d",
                                    path: r.getStorageSync("mtwm_url")
                                }), void r.hideLoading()) : 0 != a.currentIndex || r.getStorageSync("mtwm_url") ? void r.hideLoading() : (a.appid_type = 1, 
                                void a.meituan_urlFun()) : (a.appid_type = 2, void a.meituan_urlFun());
                            }
                        }), r.hideLoading(); else {
                            var t = s.globalData.util.url("entry/wxapp/api", {
                                m: s.globalData.module_name,
                                o: "subscribemessage"
                            });
                            if (r.request({
                                url: t,
                                method: "POST",
                                header: {
                                    "content-type": "application/x-www-form-urlencoded"
                                },
                                data: {
                                    openid: r.getStorageSync("openid"),
                                    type: 2
                                },
                                success: function(t) {
                                    r.setStorageSync("warn_daynum", t.data.warm_daynum);
                                }
                            }), 1 == a.currentIndex && r.getStorageSync("mtsc_url")) return 1 == r.getStorageSync("setting").mtpic && 1 == r.getStorageSync("setting").poster_type ? r.previewImage({
                                urls: [ r.getStorageSync("mtscqrcode2") ]
                            }) : r.navigateToMiniProgram({
                                appId: "wxde8ac0a21135c07d",
                                path: r.getStorageSync("mtsc_url")
                            }), void r.hideLoading();
                            if (1 == a.currentIndex && !r.getStorageSync("mtsc_url")) return a.appid_type = 2, 
                            void a.meituan_urlFun();
                            if (0 == a.currentIndex && r.getStorageSync("mtwm_url")) return 1 == r.getStorageSync("setting").mtpic && 1 == r.getStorageSync("setting").poster_type ? r.previewImage({
                                urls: [ r.getStorageSync("mtwmqrcode2") ]
                            }) : r.navigateToMiniProgram({
                                appId: "wxde8ac0a21135c07d",
                                path: r.getStorageSync("mtwm_url")
                            }), void r.hideLoading();
                            if (0 == a.currentIndex && !r.getStorageSync("mtwm_url")) return a.appid_type = 1, 
                            void a.meituan_urlFun();
                            r.hideLoading();
                        }
                        r.hideLoading();
                    },
                    close_poster: function() {
                        this.show_poster = !1;
                    },
                    previewImage: function(t) {
                        r.previewImage({
                            urls: [ t.currentTarget.dataset.src ],
                            current: 0
                        });
                    },
                    navChange: function(t) {
                        r.setStorageSync("index_nav", ""), this.loadposter = 0, this.currentIndex = t, 1 == this.currentIndex ? (this.pagebgcolor = r.getStorageSync("setting").waimaitt_meituansc_bgcolor, 
                        this.bgImg = r.getStorageSync("setting").waimaitt_meituansc_poster ? r.getStorageSync("setting").waimaitt_meituansc_poster : r.getStorageSync("setting").static_domain + "addons/" + this.module_name + "/static/images/poster/meituan.png", 
                        this.qrcode = r.getStorageSync("mtscqrcode"), this.meituan_urlFun2(), this.load_mtscqrcode2()) : (this.pagebgcolor = r.getStorageSync("setting").waimaitt_meituanwm_bgcolor, 
                        this.bgImg = r.getStorageSync("setting").waimaitt_meituanwm_poster ? r.getStorageSync("setting").waimaitt_meituanwm_poster : r.getStorageSync("setting").static_domain + "addons/" + this.module_name + "/static/images/poster/meituan.png", 
                        this.qrcode = r.getStorageSync("mtwmqrcode"), this.meituan_urlFun2(), this.load_mtwmqrcode2());
                    },
                    load_mtwmqrcode: function() {
                        var a = this;
                        this.mtwmqrcode = "../../static/images/loadding-max.gif";
                        var n = this, t = s.globalData.util.url("entry/wxapp/qrcode2", {
                            m: s.globalData.module_name
                        });
                        r.request({
                            url: t,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                openid: r.getStorageSync("openid"),
                                type: "mtwm",
                                uid: r.getStorageSync("userinfo").user_id
                            },
                            success: function(t) {
                                console.log(t);
                                var e = s.globalData.crypt.Decrypt(t.data.data.data, t.data.data.key), e = JSON.parse(e);
                                console.log(e), n.sharetitle = t.data.sharetitle, n.sharepic = t.data.sharepic, 
                                e.poster_url && e.data ? (n.mtwmqrcode = e.data, r.setStorageSync("mtwmqrcode", e.data), 
                                r.setStorageSync("mtwmposter", e.poster_url)) : n.mtwmqrcode = r.getStorageSync("setting").static_domain + "addons/" + a.module_name + "/static/images/mtwm.png";
                            }
                        });
                    },
                    load_mtscqrcode: function() {
                        var a = this;
                        this.mtscqrcode = "../../static/images/loadding-max.gif";
                        var n = this, t = s.globalData.util.url("entry/wxapp/qrcode2", {
                            m: s.globalData.module_name
                        });
                        r.request({
                            url: t,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                openid: r.getStorageSync("openid"),
                                type: "mtsc",
                                uid: r.getStorageSync("userinfo").user_id
                            },
                            success: function(t) {
                                var e = s.globalData.crypt.Decrypt(t.data.data.data, t.data.data.key), e = JSON.parse(e);
                                n.sharetitle = t.data.sharetitle, n.sharepic = t.data.sharepic, e.poster_url && e.data ? (n.mtscqrcode = e.data, 
                                r.setStorageSync("mtscqrcode", e.data), r.setStorageSync("mtscposter", e.poster_url)) : n.mtscqrcode = r.getStorageSync("setting").static_domain + "addons/" + a.module_name + "/static/images/mtsc.png";
                            }
                        });
                    },
                    load_mtwmqrcode2: function() {
                        var a, t;
                        r.getStorageSync("mtwmqrcode") || (this.mtwmqrcode = "../../static/images/loadding-max.gif", 
                        a = this, t = s.globalData.util.url("entry/wxapp/qrcode2", {
                            m: s.globalData.module_name
                        }), r.request({
                            url: t,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                openid: r.getStorageSync("openid"),
                                type: "mtwm",
                                uid: r.getStorageSync("userinfo").user_id
                            },
                            success: function(t) {
                                console.log(t);
                                var e = s.globalData.crypt.Decrypt(t.data.data.data, t.data.data.key), e = JSON.parse(e);
                                console.log(e), a.sharetitle = t.data.sharetitle, a.sharepic = t.data.sharepic, 
                                a.mtwmqrcode = e.data, r.setStorageSync("mtwmqrcode", e.data), -1 != e.poster_url.indexOf("elmsc1") && r.getStorageSync("mtwmposter") || r.setStorageSync("mtwmposter", e.poster_url);
                            }
                        }));
                    },
                    load_mtscqrcode2: function() {
                        var a, t;
                        r.getStorageSync("mtscqrcode") || (this.mtscqrcode = "../../static/images/loadding-max.gif", 
                        a = this, t = s.globalData.util.url("entry/wxapp/qrcode2", {
                            m: s.globalData.module_name
                        }), r.request({
                            url: t,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                openid: r.getStorageSync("openid"),
                                type: "mtsc",
                                uid: r.getStorageSync("userinfo").user_id
                            },
                            success: function(t) {
                                var e = s.globalData.crypt.Decrypt(t.data.data.data, t.data.data.key), e = JSON.parse(e);
                                a.mtscqrcode = e.data, a.sharetitle = t.data.sharetitle, a.sharepic = t.data.sharepic, 
                                r.setStorageSync("mtscqrcode", e.data), -1 != e.poster_url.indexOf("elmsc1") && r.getStorageSync("mtscposter") || r.setStorageSync("mtscposter", e.poster_url);
                            }
                        }));
                    },
                    swiperChange: function(t) {
                        r.setStorageSync("index_nav", ""), this.loadposter = 0;
                        t = t.detail.current;
                        this.currentIndex = t, 1 == this.currentIndex ? (this.pagebgcolor = r.getStorageSync("setting").waimaitt_meituansc_bgcolor, 
                        this.bgImg = r.getStorageSync("setting").waimaitt_meituasc_poster ? r.getStorageSync("setting").waimaitt_meituansc_poster : r.getStorageSync("setting").static_domain + "addons/" + this.module_name + "/static/images/poster/meituan.png", 
                        this.qrcode = r.getStorageSync("mtscqrcode"), this.meituan_urlFun2(), this.load_mtscqrcode2(), 
                        this.mtscposter ? this.imgSrc = this.mtscposter : this.imgSrc = "") : (this.pagebgcolor = r.getStorageSync("setting").waimaitt_meituanwm_bgcolor, 
                        this.bgImg = r.getStorageSync("setting").waimaitt_meituawm_poster ? r.getStorageSync("setting").waimaitt_meituanwm_poster : r.getStorageSync("setting").static_domain + "addons/" + this.module_name + "/static/images/poster/meituan.png", 
                        this.qrcode = r.getStorageSync("mtwmqrcode"), this.meituan_urlFun2(), this.load_mtwmqrcode2(), 
                        this.mtwmposter ? this.imgSrc = this.mtwmposter : this.imgSrc = "");
                    },
                    goback: function() {
                        r.navigateBack({});
                    },
                    gohome: function() {
                        r.navigateTo({
                            url: "../index/index"
                        });
                    },
                    getposter_mtwm1: function() {
                        var e = this;
                        1 == this.currentIndex ? r.getStorageSync("mtscposter") && -1 != r.getStorageSync("mtscposter").indexOf("mp.weixin") ? r.navigateTo({
                            url: "../kefu/webview?return_url=" + encodeURIComponent(r.getStorageSync("mtscposter"))
                        }) : (r.showLoading({
                            title: "加载中...",
                            mask: !1
                        }), r.getStorageSync("mtscposter") || r.setStorageSync("mtscposter", r.getStorageSync("setting").static_domain + "addons/" + e.module_name + "/static/images/poster/1.png"), 
                        r.getImageInfo({
                            src: r.getStorageSync("mtscposter"),
                            success: function(t) {
                                e.show_poster = !0, e.imgSrc = r.getStorageSync("mtscposter"), e.h5 = r.getStorageSync("mtsc_h5"), 
                                r.hideLoading();
                            },
                            fail: function(t) {
                                e.loadposter = 1, e.getposter_mtwm();
                            }
                        })) : r.getStorageSync("mtwmposter") && -1 != r.getStorageSync("mtwmposter").indexOf("mp.weixin") ? r.navigateTo({
                            url: "../kefu/webview?return_url=" + encodeURIComponent(r.getStorageSync("mtwmposter"))
                        }) : (r.showLoading({
                            title: "加载中...",
                            mask: !1
                        }), r.getStorageSync("mtwmposter") || r.setStorageSync("mtwmposter", r.getStorageSync("setting").static_domain + "addons/" + e.module_name + "/static/images/poster/1.png"), 
                        r.getImageInfo({
                            src: r.getStorageSync("mtwmposter"),
                            success: function(t) {
                                e.show_poster = !0, e.imgSrc = r.getStorageSync("mtwmposter"), e.h5 = r.getStorageSync("mtwm_h5"), 
                                r.hideLoading();
                            },
                            fail: function(t) {
                                e.loadposter = 1, e.getposter_mtwm();
                            }
                        }));
                    },
                    getposter_mtwm: function() {
                        var e = this;
                        1 == this.currentIndex ? (e.qrcode = r.getStorageSync("mtscqrcode"), r.getStorageSync("mtscposter") ? -1 != r.getStorageSync("mtscposter").indexOf("mp.weixin") || r.getImageInfo({
                            src: r.getStorageSync("mtscposter"),
                            success: function(t) {
                                e.imgSrc = r.getStorageSync("mtscposter"), e.h5 = r.getStorageSync("mtsc_h5");
                            },
                            fail: function(t) {
                                e.context = r.createCanvasContext("graceCanvas"), e.initSize(), setTimeout(function() {
                                    e.draw();
                                }, 1e3);
                            }
                        }) : (e.context = r.createCanvasContext("graceCanvas"), e.initSize(), setTimeout(function() {
                            e.draw();
                        }, 1e3))) : (e.qrcode = r.getStorageSync("mtwmqrcode"), r.getStorageSync("mtwmposter") ? -1 != r.getStorageSync("mtwmposter").indexOf("mp.weixin") || r.getImageInfo({
                            src: r.getStorageSync("mtwmposter"),
                            success: function(t) {
                                e.imgSrc = r.getStorageSync("mtwmposter"), e.h5 = r.getStorageSync("mtwm_h5");
                            },
                            fail: function(t) {
                                console.log(r.getStorageSync("mtwmposter")), e.context = r.createCanvasContext("graceCanvas"), 
                                e.initSize(), setTimeout(function() {
                                    e.draw();
                                }, 1e3);
                            }
                        }) : (e.context = r.createCanvasContext("graceCanvas"), e.initSize(), setTimeout(function() {
                            e.draw();
                        }, 1e3)));
                    },
                    initSize: function() {
                        var t = graceJS.system();
                        this.rpx2px = t.rpx2px, this.widthIn = r.upx2px(this.width) * this.multiple, this.heightIn = r.upx2px(this.cheight) * this.multiple, 
                        console.log(r.getStorageSync("mtwmposter"));
                    },
                    draw: function() {
                        var t = this;
                        "" != this.bgImg ? (console.log(this.bgImg), this.drawBGIMG(this.bgImg, function() {
                            t.step03();
                        })) : this.step03();
                    },
                    step03: function() {
                        var i = this;
                        1 == r.getStorageSync("setting").poster_type && 0 == this.currentIndex ? this.qrcode = r.getStorageSync("mtwmqrcode2") : 1 == r.getStorageSync("setting").poster_type && 1 == this.currentIndex && (this.qrcode = r.getStorageSync("mtscqrcode2")), 
                        console.log(this.qrcode), r.downloadFile({
                            url: this.qrcode,
                            success: function(t) {
                                var e, a, n;
                                200 === t.statusCode && (console.log("ok"), e = 0 == i.currentIndex ? (a = r.getStorageSync("setting").waimaitt_meituanwm_poster_qrcode ? r.getStorageSync("setting").waimaitt_meituanwm_poster_qrcode : 350, 
                                n = r.getStorageSync("setting").waimaitt_meituanwm_poster_qrcodex ? r.getStorageSync("setting").waimaitt_meituanwm_poster_qrcodex : 0, 
                                r.getStorageSync("setting").waimaitt_meituanwm_poster_qrcodey ? r.getStorageSync("setting").waimaitt_meituanwm_poster_qrcodey : 615) : (a = r.getStorageSync("setting").waimaitt_meituansc_poster_qrcode ? r.getStorageSync("setting").waimaitt_meituansc_poster_qrcode : 350, 
                                n = r.getStorageSync("setting").waimaitt_meituansc_poster_qrcodex ? r.getStorageSync("setting").waimaitt_meituansc_poster_qrcodex : 0, 
                                r.getStorageSync("setting").waimaitt_meituansc_poster_qrcodey ? r.getStorageSync("setting").waimaitt_meituansc_poster_qrcodey : 615), 
                                a = r.upx2px(a) * i.multiple, n = r.upx2px(n) * i.multiple, n = (i.widthIn - a + n) / 2, 
                                i.context.drawImage(t.tempFilePath, n, i.heightIn - r.upx2px(e) * i.multiple, a, a), 
                                i.drawIt());
                            },
                            fail: function(t) {
                                console.log(t);
                            }
                        });
                    },
                    drawText: function(t, e, a, n, i, o) {},
                    drawIt: function() {
                        var e = this;
                        this.imgSrc = "", this.context.draw(!0, function() {
                            r.canvasToTempFilePath({
                                x: 0,
                                y: 0,
                                width: e.widthIn,
                                height: e.heightIn,
                                destWidth: e.widthIn,
                                destHeight: e.heightIn,
                                canvasId: "graceCanvas",
                                success: function(t) {
                                    console.log(t), 1 == e.loadposter && (e.show_poster = !0, e.loadposter = 0), 1 == e.currentIndex ? (e.mtscposter = t.tempFilePath, 
                                    e.imgSrc = t.tempFilePath, r.setStorageSync("mtscposter", t.tempFilePath)) : (e.mtwmposter = t.tempFilePath, 
                                    e.imgSrc = t.tempFilePath, r.setStorageSync("mtwmposter", t.tempFilePath)), setTimeout(function() {
                                        r.hideLoading();
                                    }, 1e3);
                                },
                                fail: function(t) {
                                    console.log(t), r.hideLoading();
                                }
                            });
                        });
                    },
                    drawBGIMG: function(t, a) {
                        var n = this;
                        console.log(t), r.downloadFile({
                            url: t,
                            success: function(e) {
                                console.log(e), 200 == e.statusCode && (console.log(e.tempFilePath), r.getImageInfo({
                                    src: e.tempFilePath,
                                    success: function(t) {
                                        t = n.widthIn / t.width * t.height;
                                        console.log(t), n.context.drawImage(e.tempFilePath, 0, 0, n.widthIn, t), a();
                                    }
                                }));
                            },
                            fail: function(t) {
                                console.log(t), r.hideLoading();
                            }
                        });
                    }
                }
            };
            n.default = a;
        }).call(this, o("543d").default);
    },
    c797: function(t, e, a) {
        a.r(e);
        var n, i = a("e289"), o = a("d2b6");
        for (n in o) "default" !== n && function(t) {
            a.d(e, t, function() {
                return o[t];
            });
        }(n);
        a("54e0");
        var r = a("f0c5"), i = Object(r.a)(o.default, i.b, i.c, !1, null, null, null, !1, i.a, void 0);
        e.default = i.exports;
    },
    d2b6: function(t, e, a) {
        a.r(e);
        var n, i = a("a486"), o = a.n(i);
        for (n in i) "default" !== n && function(t) {
            a.d(e, t, function() {
                return i[t];
            });
        }(n);
        e.default = o.a;
    },
    e289: function(t, e, a) {
        a.d(e, "b", function() {
            return i;
        }), a.d(e, "c", function() {
            return o;
        }), a.d(e, "a", function() {
            return n;
        });
        var n = {
            uNavbar: function() {
                return a.e("uview-ui/components/u-navbar/u-navbar").then(a.bind(null, "dffe"));
            },
            uIcon: function() {
                return a.e("uview-ui/components/u-icon/u-icon").then(a.bind(null, "bee6"));
            },
            uSearch: function() {
                return a.e("uview-ui/components/u-search/u-search").then(a.bind(null, "6bb4"));
            },
            uCountDown: function() {
                return a.e("uview-ui/components/u-count-down/u-count-down").then(a.bind(null, "37c9"));
            },
            uTabs: function() {
                return a.e("uview-ui/components/u-tabs/u-tabs").then(a.bind(null, "8945"));
            },
            uDropdown: function() {
                return a.e("uview-ui/components/u-dropdown/u-dropdown").then(a.bind(null, "e8c3"));
            },
            uDropdownItem: function() {
                return a.e("uview-ui/components/u-dropdown-item/u-dropdown-item").then(a.bind(null, "64c6"));
            },
            uInput: function() {
                return Promise.all([ a.e("common/vendor"), a.e("uview-ui/components/u-input/u-input") ]).then(a.bind(null, "cde1"));
            },
            uRate: function() {
                return a.e("uview-ui/components/u-rate/u-rate").then(a.bind(null, "da7e"));
            },
            uEmpty: function() {
                return a.e("uview-ui/components/u-empty/u-empty").then(a.bind(null, "b399"));
            },
            uLoadmore: function() {
                return a.e("uview-ui/components/u-loadmore/u-loadmore").then(a.bind(null, "2220"));
            },
            uActionSheet: function() {
                return a.e("uview-ui/components/u-action-sheet/u-action-sheet").then(a.bind(null, "392d"));
            },
            uSelect: function() {
                return a.e("uview-ui/components/u-select/u-select").then(a.bind(null, "b869"));
            },
            sjTabBar: function() {
                return a.e("components/sj-tab-bar/sj-tab-bar").then(a.bind(null, "1ba9"));
            }
        }, i = function() {
            var a = this, t = (a.$createElement, a._self._c, a.__map(a.seconds_kill_list, function(t, e) {
                return {
                    $orig: a.__get_orig(t),
                    g0: Math.round(t.seckillShopDealInfoVO.dealList[0].finalPrice / t.seckillShopDealInfoVO.dealList[0].marketPrice * 100)
                };
            })), e = a.__map(a.shop_list, function(t, e) {
                return {
                    $orig: a.__get_orig(t),
                    l1: a.__map(t.dealBaseInfo, function(t, e) {
                        return {
                            $orig: a.__get_orig(t),
                            g1: 1 == t.dealType ? Math.round(t.marketPrice - t.finalPrice) : null,
                            g2: 2 == t.dealType ? Math.round(t.marketPrice - t.finalPrice) : null
                        };
                    })
                };
            });
            a.$mp.data = Object.assign({}, {
                $root: {
                    l0: t,
                    l2: e
                }
            });
        }, o = [];
    }
}, [ [ "8687", "common/runtime", "common/vendor" ] ] ]);